﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace shapes
{
    class Triangle : BoxShape
    {
        public Triangle(double width, double height) : base(width, height) {}

        public override double GetArea()
        {
            double area = 0;
            if (Width < Height)
            {
                area = Width * Width * Math.Sqrt(3) / 4;
            }
            else
            {
                area = Height * Height * Math.Sqrt(3) / 4;
            }
            return area;
        }
    }
}
